/*
 * main implementation: use this 'C' sample to create your own application
 *
 */





#include "derivative.h" /* include peripheral declarations */
#include "typedef.h" /* Include typedef declarations */
#include "TaskScheduler/Tasks.h" /* Include Tasks declarations */
#include "HAL/GPIO.h" /* Include GPIO declarations */
#include <stdio.h>



int main(void)
{
	uint16_t counter = 0;
	eStatusFn StatusFn;
	vfn_SIM_Init(); /*Enabling the System*/
	vfn_MCG_Init(); /*Config the Clock Generator System*/
	vfn_GPIO_INIT();
	vfn_TaskScheduler_Init();
	StatusFn = vfn_TaskCreate(&vfn_RGBRed_led, _ID00, STACK1_SIZE, "Tarea 1");
	StatusFn = vfn_TaskCreate(&vfn_RGBGreen_led, _ID01, STACK2_SIZE, "Task2");
	vfn_TaskActivate(_ID00);
	vfn_TaskActivate(_ID01);
	vfn_TaskScheduler_Start();
	TASK_Iddle();
#if _DEBUG_
	printf("Hola\n");
#endif
	for(;;) {	   
	   	counter++;
	}
	
	return 0;
}
